GATE CSE 2022
Q41.
A processor X_1 operating at 2 GHz has a standard 5-stage RISC instruction pipeline having a base CPI (cycles per instruction) of one without any pipeline hazards. For a given program P that has 30% branch instructions, control hazards incur 2 cycles stall for every branch. A new version of the processor X_2 operating at same clock frequency has an additional branch predictor unit (BPU) that completely eliminates stalls for correctly predicted branches. There is neither any savings nor any additional stalls for wrong predictions. There are no structural hazards and data hazards for X_1 and X_2. If the BPU has a prediction accuracy of 80%, the speed up (rounded off to two decimal places) obtained by X_2 over X_1 in executing P isQ42.
Consider the following threads, T_1, T_2, \text{ and }T_3 executing on a single processor, synchronized using three binary semaphore variables, S_1, S_2, \text{ and }S_3, operated upon using standard wait() and signal(). The threads can be context switched in any order and at any time.Which initialization of the semaphores would print the sequence BCABCABCA ...?Q43.
Consider routing table of an organization's router shown below: \begin{array}{|l|l|l|} Subnet Number & Subnet Mask & Next Hop \\ 12.20.164.0 & 255.255.252.0 & R1 \\ 12.20.170.0 & 255.255.254.0 & R2 \\ 12.20.168.0 & 255.255.254.0 & Interface 0 \\ 12.20.166.0 & 255.255.254.0 & Interface 1 \\ default & ~ & R3 \\ \hline \end{array} Which of the following prefixes in CIDR notation can be collectively used to correctly aggregate all of the subnets in the routing table?MSQQ44.
Consider a network with three routers P, Q, R shown in the figure below. All the links have cost of unity.The routers exchange distance vector routing information and have converged on the routing tables, after which the link Q-R fails. Assume that P and Q send out routing updates at random times, each at the same average rate. The probability of a routing loop formation (rounded off to one decimal place) between P and Q, leading to count-to-infinity problem, is ____Q45.
Consider an enterprise network with two Ethernet segments, a web server and a firewall, connected via three routers as shown below.What is the number of subnets inside the enterprise network?Q46.
The number of arrangements of six identical balls in three identical bins is ____.Q47.
Consider the following recurrence: \begin{aligned} f(1)&=1; \\ f(2n)&=2f(n)-1, & \text{for }n \geq 1; \\ f(2n+1)&=2f(n)+1, & \text{for }n \geq 1. \end{aligned}Then, which of the following statements is/are TRUE?MSQQ48.
Consider the queues Q1 containing four elements and Q2 containing none (shown as the Initial State in the figure). The only operations allowed on these two queues are Enqueue(Q,element) and Dequeue(Q). The minimum number of Enqueue operations on Q1 required to place the elements of Q1 in Q2 in reverse order (shown as the Final State in the figure) without using any additional storage isQ50.
Consider the following three relations in a relational database.Employee(eId, Name), Brand (bId, bName), Own(eId ,bId)Which of the following relational algebra expressions return the set of eIds who own all the brands?MSQ